package com.yanqingshan.platform.module.auth.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * 功能描述:系统登录请求参数
 *
 * @author yanqs
 * @since 2023-05-13
 */
@ApiModel(value = "系统登录请求参数")
@Data
public class AuthLoginReqVO implements java.io.Serializable {

    @NotEmpty(message = "登录账号不能为空")
    @Length(min = 4, max = 16, message = "账号长度为 4-16 位")
    @Pattern(regexp = "^[A-Za-z0-9]+$", message = "账号格式为数字以及字母")
    @ApiModelProperty(value = "账号")
    private String username;

    @NotEmpty(message = "密码不能为空")
    @Length(min = 4, max = 32, message = "密码长度为 4-32 位")
    @ApiModelProperty(value = "密码(前端需md5加密)")
    private String password;
}
